#include<stdio.h>
#include<stdlib.h>


// #define LENGTH 10
// #define WIDTH  5
// #define NEWLINE '\n'

const int  LENGTH = 10;
const int  WIDTH  = 5;
const char NEWLINE = '\n';

int area;

void define_constant_variable(void)
{
    // extern int LENGTH;
    // extern int WIDTH;
    // extern char NEWLINE;

   area = LENGTH * WIDTH;
   printf("value of area : %d\n", area);
   printf("%c\n", NEWLINE);
}


void const_constant_variable(void)
{

    // extern int area;
   
   area = LENGTH * WIDTH;
   printf("value of area : %d", area);
   printf("%c", NEWLINE);
}


void main(void)
{

    printf("\
    Two methods to define a constant variable:\n\
    \t1. #define preprocessor\n\
    \t\t#define identifier value\n\
    \t2. const keyword\n\
    \t\tconst type variable = value;\n");

    printf("define_constant_variable: \n");
    define_constant_variable();
    
    printf("const_constant_variable:\n");
    const_constant_variable();

    system("pause");
}